from typing import List

from server.module_chat.chat.core.agent.tool.tool import Tool
from server.settings import Settings


class ToolFactory:
    def create(self, id: str) -> Tool:
        tools: List[Tool] = Settings.agent_settings.TOOLS_CONFIG
        for tool in tools:
            if tool.id == id:
                return tool
        return None

    # def create(tools: List[Tool]):
    #     return [ToolFactory.create(tool.id) for tool in tools]
